<template>
	<view>
		<view class="setting-list">
			<view class="setting-list-block">
				<view class="block-name">看点评权限</view>
				<view class="setting-item" @tap="toSetVisibleFriends(4)">
					<text class="item-name">不让他(她)看</text>
					<image class="right-arrow-icon" src="../../static/rightArrowIcon.png"></image>
				</view>
				<view class="setting-item" @tap="toSetVisibleFriends(5)">
					<text class="item-name">不看他(她)</text>
					<image class="right-arrow-icon" src="../../static/rightArrowIcon.png"></image>
				</view>
			</view>
		</view>
		<view class="submit-btn-wrap">
			<largeBtn @btnClk="signout">退出登录</largeBtn>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {

			};
		},
		methods:{
			toSetVisibleFriends(type){
				uni.navigateTo({
					url: `/pages/userDetail/selectVisibleFriends?type=${type}`
				})
			},
			signout(){
				this.$api.signout().then((res)=>{
					uni.showToast({
					  title: '退出成功',
					  icon: 'none'
					})
					this.$store.commit('setUserToken','')
					this.$store.commit('setUserInfo',{})
					uni.setStorageSync('token', '');
					setTimeout(()=>{
					    uni.redirectTo({
					    	url: '/pages/login/index'
					    })
					},1000)
				})
			}
		}
	}
</script>

<style lang="less">
	.setting-list {

		.setting-list-block {
			width: 610rpx;
			margin: 40rpx auto;

			.block-name {
				margin-bottom: 36rpx;
				font-size: 36rpx;
				font-weight: 400;
				color: #323746;
				line-height: 50rpx;
			}

			.setting-item {
				height: 100rpx;
				display: flex;
				align-items: center;
				justify-content: space-between;
				border-bottom: 2rpx solid #EEEEEE;

				.item-name {
					font-size: 30rpx;
					font-weight: 400;
					color: #323746;
					line-height: 42px;

				}

				.right-arrow-icon {
					width: 54rpx;
					height: 54rpx;
				}
			}
		}
	}

	.submit-btn-wrap {
		position: fixed;
		left: 40rpx;
		bottom: 48rpx;
		width: 670rpx;
	}
</style>
